<template>
  <div>
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <todayrecommend></todayrecommend>
    <rank></rank>
    <like></like>
    <floor v-for="floor in floorList" :key="floor.id" :floor="floor"></floor>
    <brand></brand>
  </div>
</template>

<script>
import ListContainer from "./ListContainer";
import todayrecommend from "./todayrecommend";
import like from "./like";
import rank from "./rank";
import floor from "./floor";
import brand from "./brand";
import { mapState } from "vuex";
export default {
  name: "Home",
  components: {
    ListContainer,
    todayrecommend,
    rank,
    like,
    floor,
    brand,
  },
  mounted() {
    this.getFloorList();
  },
  methods: {
    getFloorList() {
      this.$store.dispatch("getFloorList");
    },
  },
  computed: {
    ...mapState({
      floorList: (state) => state.home.floorList,
    }),
  },
};
</script>

<style lang="less" scoped>
</style>
